package fifteenth.取得类的结构;

interface China {
    public static final String NATIONAL = "China";
    public static final String STUDENT = "业成";

    public void sayChina();

    public String sayHello(String name, int age);

}

public class Person implements China {
    private String name;
    private int age;

    public Person() {
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "姓名：" + name + ",年龄" + age;
    }

    @Override
    public void sayChina() {
        System.out.println("作者："+STUDENT+",国籍："+NATIONAL);

    }

    @Override
    public String sayHello(String name, int age) {
        return name+"，你好！今年我"+age+"岁了";
    }
}
